%!PS-Adobe-3.0 EPSF-3.0
%%Title:                     fill_angle_120
%%BoundingBox:     18   47   135   113
%%EndComments

% these procedures have been posted in comp.lang.postscript
% by Bill Lee, bill@leeweyr.sccsi.com, on Apr 19 1995
% subject: arc with arrow head
% changes by Cristian Barbarosie in 2018 cristian.barbarosie@gmail.com


%* _____________________________ Arrows ____________________________________ 

%* Procedure to draw the path for an arrow head. Note: the arrowhead will be 
%* added to the current path. The arrowhead will also be drawn and filled. 
%* 
%* Usage: Linewidth deltaX deltaY ArrowHead 
%* 
%* where: LineWidth is the width in points of the arrow head lines 
%* 
%* deltaX and deltaY define the direction that the arrow points 
%* 
%* Note: If Linewidth is zero, a value of 1 will be substituted 
%*
/rArrowHead { 
exch atan matrix currentmatrix exch rotate exch 
dup 0 eq 
{ pop 1 } if 
dup scale 
-7 2 rlineto 
1 -2 rlineto 
-1 -2 rlineto 
% closepath
% with closepath we get a sharp arrow
7 2 rlineto
% with rlineto we get a pointless arrow (not ugly)
currentpoint 
gsave
newpath moveto 
-7 2 rlineto 
1 -2 rlineto 
-1 -2 rlineto 
closepath 
fill 
grestore 
setmatrix 
} def 

%* Procedure to draw the path for an arrow head. Note: the arrowhead will be 
%* added to the current path. The arrowhead will also be drawn and filled. 
%* 
%* Usage: Linewidth PreviousX PreviousY ArrowHead 
%* 
%* where: LineWidth is the width in points of the arrow head lines 
%* 
%* PreviousX and PreviousY along with the currentpoint 
%* define the direction that the arrow points 
%* 
%* Note: If Linewidth is zero, a value of 1 will be substituted 
%*
/ArrowHead { 
currentpoint 
4 2 roll exch 4 -1 roll exch 
sub 3 1 roll sub
rArrowHead
} def 

%* _____________________________ RLineto^ ____________________________________ 
%* Procedure to add a relative line to the current path and then add the 
%* path for an arrow on its end. 
%* 
%* Usage: x y RLineto^ 
%* 
%* where: x and y are the offsets from the current point 
%* 
/RLineto^ { 
currentlinewidth currentpoint 5 3 roll 
rlineto 
ArrowHead 
} def 

%* _____________________________ Lineto^ ____________________________________ 
%* Procedure to add a line to the current path and then add the 
%* path for an arrow on its end. 
%* 
%* Usage: x y Lineto^ 
%* 
%* where: x and y are the new points for the path 
%* 
/Lineto^ { 
currentlinewidth currentpoint 5 3 roll 
lineto 
ArrowHead 
} def 

%* _____________________________ Arc^ ____________________________________ 
%* Procedure to add an arc to the current path and then add the 
%* path for arrow on its end. 
%* 
%* Usage: x y r ang1 ang2 Arc^ 
%* 
%* where: x, y, ang1, ang2, and r are the normal parameters 
%* for drawing an arc. 
%* 
/Arc^ { 
5 copy arc 
exch pop 2 sub 
dup cos 2 index mul 4 index add 
exch sin 2 index mul 3 index add 
currentlinewidth 3 1 roll 
ArrowHead pop pop pop 
} def 

%* _____________________________ Arcn^ ____________________________________ 
%* Procedure to add an arc to the current path and then add the 
%* path for arrow on its end. 
%* 
%* Usage: x y r ang1 ang2 Arcn^ 
%* 
%* where: x, y, ang1, ang2, and r are the normal parameters 
%* for drawing an arcn. 
%* 
/Arcn^ { 
5 copy arcn 
exch pop 2 add 
dup cos 2 index mul 4 index add 
exch sin 2 index mul 3 index add 
currentlinewidth 3 1 roll 
ArrowHead pop pop pop 
} def 

% from xfig :
/DrawEllipse {
	/endangle exch def
	/startangle exch def
	/yrad exch def
	/xrad exch def
	/y exch def
	/x exch def
	/savematrix matrix currentmatrix def
	x y translate xrad yrad scale 0 0 1 startangle endangle arc
	closepath
	savematrix setmatrix
} def



1 setlinecap
20 rotate

1.3 setlinewidth
1 0.5 0 setrgbcolor
55 85 moveto
73 88 lineto
66 60 lineto  % A
85 35 lineto  % point120
120 35 lineto  % B
140 60 lineto
160 57 lineto
stroke

0.8 setlinewidth

40 60 moveto

120 35 moveto 127 25 lineto stroke
66 60 moveto 60 40 lineto stroke
66 60 moveto 50 53 lineto stroke
66 60 moveto 55 70 lineto stroke
65 35 moveto 85 35 lineto stroke
85 35 moveto 77 25 lineto stroke
85 35 moveto 93 25 lineto stroke
120 35 moveto 112 25 lineto stroke
120 35 moveto 135 36 lineto stroke
140 60 moveto 145 45 lineto stroke

gsave
[3 3] 0 setdash
1 setlinewidth
0.9 0.4 0.4 setrgbcolor
66 60 moveto 105 65 lineto  % P
85 35 lineto stroke
105 65 moveto 120 35 lineto stroke
grestore



showpage
%%Trailer
%EOF
